import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta:{
      isShowTabbar:true
    }
  },
  {
    path: '/about',
    name: 'About',
    component: () => import('../views/About.vue'),
    meta:{
      isShowTabbar:true
    }
  },
  {
    path: '/shop',
    name: 'Shop',
    component: () => import('../views/Shop.vue'),
    meta:{
      isShowTabbar:false
    }
  },
  {
    path: '/classify',
    name: 'Classify',
    component: () => import('../views/Classify.vue'),
    meta:{
      isShowTabbar:true
    }
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../components/user/Login.vue'),
  },{
    path: '/register',
    name: 'Register',
    component: () => import('../components/user/Register.vue')
  }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
